Methods and systems for detection of repeating patterns of features

ABSTRACT

Methods and system for automatic identification of repeating patterns of slanted stripe features (marks) on an item.

BACKGROUND OF THE INVENTION

This invention relates generally to methods and systems for recognizingpatterns, and, more particularly, to methods and systems for automaticdetection of repeating patterns of features.

Repeating stripe features (also referred as “chevron marks”) are used ina variety of applications. In one application, edge marks such asalternating red and blue diagonal stripes located at equal intervalsaround the edge of the envelope are used, in some countries, to indicatethat postal material is airmail. Other marks, such as airmail marks, mayoverlap the striped edge airmail marks. Stamps may also partiallyoverlap the edge marks. This overlapping of airmail marks and edge marksand of stamps and edge marks at times makes the airmail mark and thestamp difficult to distinguish from the edge marks and, therefore,difficult to detect. Separate detection of the edge marks (“chevron”marks) will reduce any difficulty caused by overlapping of other marksand the edge marks.

While the detection of repeating stripe (“chevron”) marks is not adifficult task for a human observer, the automatic detection ofrepeating stripe (“chevron”) features (marks) presents uniquechallenges.

It is therefore an object of this invention to provide methods andsystems for automatic detection of repeating patterns of slanted stripefeatures.

It is a further object of this invention to provide methods and systemsfor automatic detection of repeating patterns of slanted stripe features(marks) on mail items.

BRIEF SUMMARY OF THE INVENTION

The objects set forth above as well as further and other objects andadvantages of the present invention are achieved by the embodiments ofthe invention described hereinbelow.

A method and system for automatic detection of repeating patterns ofslanted stripe features on an item are disclosed.

In the initial step of the method of this invention a digital image ofthe item is acquired. Pixel data is then obtained for pixels in thedigital image. Line segment data is extracted from the pixel data. A setof collinear line segments is identified from the line segment data. Aset of lines intersecting members of the set of collinear line segmentsis identified from the line segment data. The set of intersecting linesand the set of collinear lines identify a set of features (marks). Inone embodiment of the method of this invention, in identifying the setof collinear line segments, the method also includes constructing ahistogram displaying a number of line segments in predetermined angularranges. In another embodiment, the method includes verifying that theidentified set of features is located at a preselected location on theitem. The method can be applied to identifying and locating slantedstripe marks on mail pieces.

A system of this invention includes a digital image acquisition module,one or more processors, and one or more computer readable memorieshaving computer readable code that enables the one or more processors toperform the method of this invention. The computer readable code thatenables the one or more processors to perform the method of thisinvention can be embodied in a computer readable medium.

For a better understanding of the present invention, together with otherand further objects thereof, reference is made to the accompanyingdrawings and detailed description and its scope will be pointed out inthe appended claims.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWING

FIG. 1 is a flowchart of an embodiment of the method of this invention;

FIG. 2 a is an initial section of a flowchart of a detailed embodimentof the method of this invention;

FIG. 2 b is a subsequent section of a flowchart of a detailed embodimentof the method of this invention;

FIG. 3 is a flowchart of another embodiment of the method of thisinvention;

FIG. 4 is a graphical schematic representation of an original image ofexemplary item including marks;

FIG. 5 is a graphical schematic representation of the image of FIG. 4including partial results of an embodiment of the method of thisinvention;

FIG. 6 is a graphical schematic representation of the image of FIG. 4including further partial results of an embodiment of the method of thisinvention;

FIG. 7 is a graphical schematic representation of the image of FIG. 4including final results of an embodiment of the method of thisinvention; and

FIG. 8 is a block diagram representative of an embodiment of the systemof this invention.

DETAILED DESCRIPTION OF THE INVENTION

Methods and system for automatic detection of repeating patterns ofslanted stripe features (hereinafter also referred to as marks) on anitem are disclosed herein below.

A flowchart of an embodiment of the method of this invention is shown inFIG. 1. Referring to FIG. 1, the first step in the method is theacquisition of a digital image (step 20, FIG.1). Pixel data is obtainedfor each pixel in the image (step 30, FIG. 1). Line segment data is thenobtained from the pixel data (step 40, FIG. 1) by conventional means. Anumber of conventional methods have can be utilized for obtaining linesegment data from the pixel data. Some examples of methods that can beutilized for obtaining line segment data from the pixel data are, butnot limited to, the line finder algorithm of Khan, Kitchen and Riseman(Kahn, P., Kitchen, L., and Riseman, E. M. A fast line finder forvision-guided robot navigation. IEEE Transactions on Pattern Analysisand Machine Intelligence 12, 3 (1990), 1098-1102) and the line extractorof Aste, Boninsegna and Caprile (M. Aste, M. Boninsegna, and B. Caprile.A Fast Straight Line Extractor for Vision Guided Robot Navigation,Technicat report, Istituto per La Ricerca Scientifica e Tecnologica,1994 available at http://citcseer.nj.nec.com/aste93fast.html).

Once the line segment data have been obtained, a group of collinearsegments can be identified (step 50, FIG. 1). Comparing properties of acollinear line segment to characteristic values (properties)representative of the group of collinear segments, it can be verifiedwhether each collinear line segment from the plurality of collinear linesegments is a valid element of the group of collinear line segments(step 70, FIG. 1). Those elements that are not deemed to be members ofthe group are culled from the group (step 80, FIG. 1). (In oneembodiment, the length of each collinear line segment is compared to themedian length for the group of collinear line segments. If the length ofthe collinear line segment is not within a predetermined threshold ofthe median length, the line segment is culled.)

Utilizing the culled group of collinear line segments and the linesegment data, a group of lines intersecting the culled group ofcollinear lines is identified (step 90, FIG. 1). The group ofintersecting lines and the group of collinear lines identifies a groupof marks.

Utilizing the method described above, a subsequent group of collinearline segments can be identified from the line segment data and asubsequent group of intersecting lines intersecting the subsequent groupof collinear lines can be identified. The subsequent group ofintersecting lines and the subsequent group of collinear linesidentifies a subsequent group of marks.

From the line segment data, it can be determined whether the group ofidentified marks 95 (FIG. 3) and the subsequent group of identifiedmarks 105 (FIG. 3) are substantially overlapping (step 115, FIG. 3).From the line segment data, it can also be determined whether the groupof identified marks and the subsequent group of identified marks havesubstantially similar collinearity (step 125, FIG. 3). If the group ofidentified marks and the subsequent group of identified marks aresubstantially overlapping and if the group of identified marks and thesubsequent group of identified marks have substantially similarcollinearity, the group of identified marks and the subsequent group ofidentified marks are merged into one group (step 135, FIG. 3).

In order to better understand the method of this invention, a detailedembodiment is given below. FIG. 4 depicts a mail piece containing marksaround the edges of a mail piece 200 that indicates that the mail isairmail. The marks, a repeating pattern of parallelograms or rectanglesof alternating colors surrounding the outside of the envelope, arereferred to as chevrons. In order to automatically determine whether themail piece is airmail, the chevron marks have to identified.

Utilizing the method of FIG. 1, a digital image is acquired (step 20,FIG. 1). Pixel data is obtained for each pixel in the image (step 30,FIG. 1). Line segment data, including line angle data, is then obtainedfrom the pixel data (step 40, FIG. 1) by conventional means such as, butnot limited to, the line finder algorithm of Khan, Kitchen and Risemanand the line extractor of Aste, Boninsegna and Caprile. A histogram ofthe angles of the lines is obtained (step 140, FIG. 2 a). A number ofpeaks, p peaks, in the line angle histogram are located (step 150, FIG.2 a). For each peak in the histogram, the peak is grouped with a numberof the neighboring bins, n bins, to the right and left in the histogram(step 160, FIG. 2 a). The group of line data samples including thehistogram peak and the neighboring n bins to the right and left in thehistogram constitute the set of line data samples 170 (FIG. 2 a) to beutilized in identifying the marks.

The identifying of the collinear line segments (step 50, FIG. 1) in theset of line data samples 170 includes the following steps. The lines inthe set of line data samples 170 are rotationally corrected by rotatingthe lines by the angle of the peak bin in the histogram (step 190, FIG.2 b). The rotated lines are projected onto the coordinate representingthe edge of the mail item, labeled as the ordinate (step 210, FIG. 2 b).A histogram of the number of lines projected onto an ordinate axislocation is created. The peak value of the histogram of the number oflines projected onto an ordinate axis location is compared to apredetermined threshold. If the peak value is bigger than the threshold,the lines in the histogram bin containing the peak value are identifiedas a group of collinear lines.

The process is repeated for the set of line data samples 170corresponding to each peak in the histogram resulting in a number ofgroups of collinear lines. For each of these groups, the median linelength in the group is found and all lines that are not within apredetermined median line threshold are removed from the group. Anygroups that no longer have enough lines to be considered are removed. Agroup of collinear lines 220 in the mail piece 200 of FIG. 4 is shown inFIG. 5.

For each group of collinear lines, a group of intersecting lines isidentified from the corresponding set of line data samples 170. Thegroup of collinear lines and the corresponding group of intersectinglines constitute a group of identified marks. The collinear line group220 of FIG. 5 and the corresponding group of intersecting lines 230 areshown in FIG. 6.

For any two groups of identified marks, it can be determined whether onegroup of identified marks and the other group of identified marksoverlap within an overlapping threshold. It can be also determinedwhether the two groups, one group of identified marks and the othergroup of identified marks, have a similar collinear angle within acollinearity threshold. If one group of identified marks and the othergroup of identified marks overlap within an overlapping threshold andone group of identified marks and the other group of identified markshave a similar collinear angle within a collinearity threshold, thegroups are merged. The determination of whether one group of identifiedmarks and the other group of identified marks overlap can, in oneembodiment, be performed by obtaining, for each group of identifiedmarks, a bounding rectangle (box) including the group of collinear linesand the corresponding edge of the mail item 200 shown in FIG. 4 andbounding the group of intersecting lines. If two bounding rectanglesoverlap, the two groups of identified lines overlap.

The thresholds utilized in the various comparisons detailed above canbe, but not limited to, obtained by analysis and experimentation on alarge database of similar image images.

The resulting groups of collinear lines and the corresponding groups ofintersecting lines constitute the groups of identified marks. Anestimated number of marks (Chevron Elements) and the estimated width ofeach mark can also be obtained. FIG. 7 depicts the two resulting groupsof identified marks 250, 260 for the mail item 200 of FIG. 4.

If information is available about the location and size of other blockson the mail piece 200, that information can be used to determine if themarks 250, 260 are in a location on the mail piece 200 where chevronmarks are expected to be (a “valid” or preselected location). Thus, inthe embodiment of FIG. 7, from location and size of the address block,and/or the stamps, and/or the airmail indicator on the mail piece 200,it is possible to verify that the identified groups of marks 250, 260are located at a valid location on the item.

A block diagram representation of an embodiment of the system 300 thatimplements the method of this invention is shown in FIG. 8. Referring toFIG. 8, the system 300 includes a digital image acquisition module 310capable of acquiring a digital image of the item, one or more processors320, and one or more computer readable memories 330. The one or morecomputer readable memories have computer readable code embodied therein,which is capable of causing the at least one processor to execute theabove described methods of this invention. The digital image acquisitionmodule 310 can be, but is not limited to, a video camera, a digitalstill camera, or an image acquisition sensor with the necessary opticsand control and processing electronics. The interface component 315receives the image data from the digital image acquisition module 310and provides the image data to the computer readable memories 330, 340.The computer readable memory 340 provides memory for other operationaltasks.

It should also be noted that “mail piece” as used in this inventionrefers to any addressed object in a package or mail delivery system.

It should also be noted that although the methods of this invention havebeen described in detail for the embodiment in which the slanted marksare located on a mail piece, the methods of this invention can beapplied to any repeating pattern of slanted stripe features, such asslanted marks.

In general, the techniques described above may be implemented, forexample, in hardware, software, firmware, or any combination thereof.The techniques described above may be implemented in one or morecomputer programs executing on a programmable computer including aprocessor, a storage medium readable by the processor (including, forexample, volatile and non-volatile memory and/or storage elements), atleast one input device, and at least one output device. Program code maybe applied to data entered using the input device to perform thefunctions described and to generate output information. Input device, asused herein, refers to any device, such as, but not limited to, akeyboard, a mouse, voice input, a touch sensitive pad or display, acomputer pen, or a writing tablet, that is used to provide input data toprovide data to programmable computer. The output information may beapplied to one or more output devices.

Each computer program within the scope of the claims below may beimplemented in any programming language, such as assembly language,machine language, a high-level procedural programming language, or anobject-oriented programming language. The programming language may be acompiled or interpreted programming language.

Each computer program may be implemented in a computer program producttangibly embodied in a computer-readable storage device for execution bya computer processor. Method steps of the invention may be performed bya computer processor executing a program tangibly embodied on acomputer-readable medium to perform functions of the invention byoperating on input and generating output.

Common forms of computer-readable or usable media include, for example,a floppy disk, a flexible disk, hard disk, magnetic tape, or any othermagnetic medium, a CDROM, any other optical medium, punched cards, papertape, any other physical medium with patterns of holes, a RAM, a PROM,and EPROM, a FLASH-EPROM, any other memory chip or cartridge, a carrierwave, or any other medium from which a computer can read.

Although the invention has been described with respect to variousembodiments, it should be realized this invention is also capable of awide variety of further and other embodiments within the spirit andscope of the appended claims.

1. A method for detecting features on an item, the method comprising thesteps of: acquiring a digital image of the item; obtaining pixel datafor a plurality of pixels in the digital image; extracting line segmentdata from the pixel data, said line segment data comprising line segmentangle data; identifying a plurality of collinear line segments from theline segment data; identifying another plurality of line segments fromthe line segments data; each line segment from said another plurality ofline segments intersecting at least one line segment of said pluralityof collinear line segments; and, identifying, utilizing said anotherplurality of line segments and the plurality of collinear lines, aplurality of features, the identified plurality of features comprisingsaid another plurality of lines segments and the plurality of collinearlines.
 2. The method of claim 1 further comprising the steps of:verifying that each collinear line segment from the plurality ofcollinear line segments has characteristic properties of an element ofthe plurality of collinear line segments; and, removing from theplurality of collinear line segments each collinear line segment thatdoes not have characteristic properties of an element of the pluralityof collinear lines segments.
 3. The method of claim 1 wherein the stepof identifying the plurality of collinear line segments from the linesegment data comprises the step of: constructing a histogram displayinga number of line segments in a predetermined angular range from aplurality of predetermined angular ranges.
 4. The method of claim 1further comprising the step of: verifying that the identified pluralityof features is located at a preselected location on the item.
 5. Themethod of claim 1 further comprising the steps of: identifying asubsequent plurality of collinear line segments from the line segmentdata; identifying a subsequent plurality of intersecting lines from theline segment data; and, identifying a subsequent plurality of featurescomprising the subsequent plurality of intersecting lines and thesubsequent plurality of collinear lines; wherein the intersecting linesfrom the subsequent plurality of intersecting lines intersect thesubsequent plurality of collinear lines.
 6. The method of claim 5further comprising the steps of: determining whether the plurality ofidentified features and the subsequent plurality of identified featuresare substantially overlapping; determining whether the plurality ofidentified features and the subsequent plurality of identified featureshave substantially similar collinearity; and, merging the plurality ofidentified features and the subsequent plurality of identified featuresif the plurality of identified features and the subsequent plurality ofidentified features are substantially overlapping and have substantiallysimilar collinearity.
 7. The method of claim 4 wherein the itemcomprises a mail piece.
 8. A system for identifying features on an itemcomprising: a digital image acquisition module capable of acquiring adigital image of the item; at least one processor; and, at least onecomputer readable memory having computer readable code embodied therein,the computer readable code capable of causing the at least one processorto: obtain pixel data for a plurality of pixels in the digital image;extract line segment data from the pixel data, said line segment datacomprising line segment angle data; identify a plurality of collinearline segments from the line segment data; identify another plurality ofline segments from the line segment data; each line segment from saidanother plurality of line segments intersecting at least one linesegment of said plurality of collinear line segments; and, identifying,utilizing said another plurality of line segments and the plurality ofcollinear lines, a plurality of features, the identified plurality offeatures comprising said another plurality of lines segments and theplurality of collinear lines.
 9. The system of claim 8 wherein thecomputer readable code is further capable of causing the at least oneprocessor to: verify that each collinear line segment from the pluralityof collinear line segments has characteristic properties of an elementof the plurality of collinear line segments; and, remove from theplurality of collinear line segments each collinear line segment thatdoes not have characteristic properties of an element of the pluralityof collinear lines segments.
 10. The system of claim 8 wherein thecomputer readable code is further capable of causing the at least oneprocessor to: verify that the identified plurality of features islocated at a preselected location on the item.
 11. The system of claim 8wherein the computer readable code is further capable of causing the atleast one processor to: identify a subsequent plurality of collinearline segments from the line segment data; identify a subsequentplurality of intersecting lines from the line segment data; and,identify a subsequent plurality of features comprising the subsequentplurality of intersecting lines and the subsequent plurality ofcollinear lines; the intersecting lines from the subsequent plurality ofintersecting lines intersecting the subsequent plurality of collinearlines.
 12. The system of claim 11 wherein the computer readable code isfurther capable of causing the at least one processor to: determinewhether the plurality of identified features and the subsequentplurality of identified features are substantially overlapping;determine whether the plurality of identified features and thesubsequent plurality of identified features have substantially similarcollinearity; and, merge the plurality of identified features and thesubsequent plurality of identified features if the plurality ofidentified features and the subsequent plurality of identified featuresare substantially overlapping and have substantially similarcollinearity.
 13. The system of claim 10 wherein the item comprises amail piece.